package util;

import javax.persistence.EntityManager;
import javax.persistence.Persistence;

public class EMUtil {
	private final static String JPAUnit = "SJTest";
	private static EntityManager em = Persistence.createEntityManagerFactory(JPAUnit).createEntityManager();
	
	public static EntityManager getEM(){
		if(em == null)
			em = Persistence.createEntityManagerFactory(JPAUnit).createEntityManager();
		return em;
	}
}
